package nccloud.web.gl.voucher.action;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSON;

import nc.bs.util.DefdocUtils;
import nc.bs.voucher.itf.IVoucherDetailPrintService;
import nc.vo.pub.BusinessException;
import nc.vo.pub.lang.UFDouble;
import nc.vo.trade.voutils.SafeCompute;
import nccloud.dto.gl.detailass.RequestDetialAssDTO;
import nccloud.framework.core.exception.ExceptionUtils;
import nccloud.framework.core.io.WebFile;
import nccloud.framework.service.ServiceLocator;
import nccloud.framework.web.action.itf.ICommonAction;
import nccloud.framework.web.container.IRequest;
import nccloud.framework.web.json.JsonFactory;
import nccloud.nc.ui.trade.excelimport.io.XLSFileUtil;
import nccloud.pubitf.gl.lightgl.voucher.IVoucherWebExtHrpService;
import nccloud.ui.trade.excelimport.parser.IFileParserConstants;
import nccloud.web.codeplatform.framework.action.base.VOTransform;

public class queryDefdocListCodeAndNameDataAction implements ICommonAction {

	@Override
	public Object doAction(IRequest request) {
		String json = request.read();
		Map valMap = JsonFactory.create().fromJson(json, Map.class);
		Object code = valMap.get("code");
		List<Map<String, Object>> deflists = null;
		try {
			deflists = DefdocUtils.getDefdoc(code);
			
		} catch (BusinessException e) {
			ExceptionUtils.wrapException(e);
			return null;
		}
		return deflists;
	}

}
